package com.t2t.top.action.$17chain.filterchain;

public class HtmlFilter implements Filter {

    public void doFilter(Request req, Response resp, FilterChain chain) {
        //过滤req.reqStr中的HTML标记
        req.reqStr = req.reqStr.replace("<", "&lt;").replace(">", "&gt;");

        System.out.println("---HtmlFilter() start ---");
        chain.doFilter(req, resp);
        System.out.println("---HtmlFilter() end---");
    }
}